let myAnswerApp = new Vue({
    el:'#myAnswerApp',
    data:{
        questions:[
            {content:'不知道',createdTime:"3天前"}
        ],
        pageInfo:[]
    },
    methods:{
        loadAnswerApp:function (page) {
            if (!page || page<1)
                page=1;
            $.ajax({
                url:'/api/v1/answers/my',
                data:'page='+page,
                success:function (json) {
                    let data = json.data;
                    let collection = data.list;
                    for (let i = 0; i < collection.length; i++) {
                        let replace = collection[i].content.replace(/<\/?[^>]*>/g,'');
                        collection[i].content=replace
                        collection[i].createdTime = getCreatedTimeText(collection[i].createdTime);
                    }

                    myAnswerApp.questions = collection;
                    myAnswerApp.pageInfo = data;
                }
            });
        }
    },
    created: function () {
        this.loadAnswerApp();
    }
});